home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
editor
/
changeicon.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
2KB
|
71 lines
/* ChangeIcon.rexx V1.1 -- Change the icon on a clip. */
/* By Bob Caron (Grue) ©1995 NewTek Inc. */
numeric digits 12
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
/* The following stuff is just to get a filename with a path */
call req_error("Change Icon V1.1 --- Change the icon of a flyer clip.")
rx startfilereq("Choose a clip to change its icon.","","")
exit=1
do while exit=1
file=queryfilereq()
if file=0 then call quit
if file~="" then exit=0
address command "c:wait 1"
end
if lastpos('/',file,length(file)-1)~=0 then do
filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
path=left(file,(lastpos('/',file,length(file))-1))
end
else do
filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
path=left(file,(lastpos(':',file,length(file))))
end
address command "c:cd "path
call pragma("D",path)
path=pragma("D","RAM:")
if right(path,1)=":" then Source=path||filenam
else Source=path||"/"||filenam
if isclip(source)=0 then do
call req_tell("Error!"," That isn't a clip!")
call quit()
end
icontime=REQ_FLYERJOG("Choose frame for icon.",source,1)
if icontime="CANCEL" then call quit
icontime=(icontime*2)
call makeicon(source,icontime)
call req_error("All done.")
call remlib('PROJECT_REXX_PORT')
exit
quit: PROCEDURE
call req_error("Canceled.")
call remlib('PROJECT_REXX_PORT')
exit
isclip:
parse arg clipname
if open('CLIP',clipname,'R') then do
padding=readch('CLIP',12)
if substr(padding,1,4)='CLIP' then return 1
end
call close ('Clip')
return 0